#ifndef LINKEDLIST_H_
#define LINKEDLIST_H_

#include <datastructs.h>

typedef struct linkedlist
{
	struct linkedlist *next;
	struct linkedlist *prev;
	void *node;
} linkedlist_t;

typedef struct slinkedlist
{
	struct slinkedlist *next;
	void *node;
} slinkedlist_t;

linkedlist_t * linkedlist_sort(linkedlist_t *list, f_sort sorter);
void linkedlist_insert_after(linkedlist_t *node, linkedlist_t *ref);
void linkedlist_insert_before(linkedlist_t *node, linkedlist_t *ref);

void slinkedlist_insert_after(slinkedlist_t *node, slinkedlist_t *ref);
void slinkedlist_insert_before(slinkedlist_t *node, slinkedlist_t *ref);

#endif /*LINKEDLIST_H_*/
